package org.dei.perla.sys.registry.datastructure;

import java.util.ArrayList;

import java.util.HashMap;

public class FunctionalityProxyComponent {

	public static int IDcount=0;
	private int ID;
	
	//the fpc has many attribute each with a given value;
	public HashMap<String,Comparable> attributesMap;
	
	public FunctionalityProxyComponent(HashMap<String, Comparable> attr ){
		
		this.attributesMap=attr;
		ID=IDcount;
		IDcount++;
	}
	
	public int getID(){
		return ID;
	}
	
	public void setID(int id){
		this.ID = id;
	}
	
	public HashMap<String,Comparable> getAttributesMap(){
		return this.attributesMap;
	}
	public void setAttributesMap(HashMap<String,Comparable> attr){
		this.attributesMap=attr;
	}
	
	public Comparable readAttributeval(String Attr){
		assert(!this.attributesMap.isEmpty()):"attempt to read from an empty map ";
		return attributesMap.get(Attr);
	} 
	
	public boolean containAttribute(String attr){
		return attributesMap.containsKey(attr);
	}
	
}
